<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSingleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('single', function (Blueprint $table) {
            $table->increments('id')->comment('自增ID');
            $table->integer('category_id')->comment('分类ID');
            $table->string('name',50)->comment('单品名称');
            $table->string('pic',255)->comment('单品图片');
            $table->string('describe',255)->comment('单品描述');
            $table->integer('visitor')->default(0)->comment('访问量');
            $table->tinyInteger('recommend')->default(2)->comment('推荐状态1：推荐2：非推荐');
            $table->tinyInteger('disstatus')->default(1)->comment('显示状态1：显示2：隐藏');
            $table->integer('time')->comment('创建时间');
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
